package yunplus.io.hchome.presenter.implement;

import android.content.Context;

import yunplus.io.hchome.model.api.contract.IVedioModel;
import yunplus.io.hchome.presenter.contract.IVedioPresenter;

/**
 * Created by cruze on 2017/6/7.
 */

public class VedioPresenter implements IVedioPresenter {


    private Context mContext;

    private IVedioModel mVedioModel;


    public VedioPresenter(Context context){

        this.mContext = context;
    }

    public void unregisterPreseter() {

        this.mContext = null;
        this.mVedioModel = null;
    }

    @Override
    public void startRecord() {
        mVedioModel.startRecord();
    }

    @Override
    public void pauseRecord() {
        mVedioModel.pauseRecord();
    }

    @Override
    public void stopRecord() {
        mVedioModel.stopRecord();
    }

    @Override
    public void play() {
        mVedioModel.play();
    }

    @Override
    public void pause() {
        mVedioModel.pause();
    }

    @Override
    public void seek(boolean forward, double progress) {
        mVedioModel.seek(forward,progress);
    }

    @Override
    public void next() {
        mVedioModel.next();
    }

    @Override
    public void prev() {
        mVedioModel.prev();
    }
}
